package com.example.springboot.mapper;

import com.example.springboot.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserRoleMapper {

    //根据用户Id得到所有相关的DmUserRole
    List<UserRole> getByUserId(Long id);
    //根据用户Id得到所有相关的DmUserRole
    List<UserRole> getByRoleId(Long id);

    void deleteAll(@Param("userId") Long userId);

    void update(UserRole userRole);

    void add(UserRole userRole);


}
